﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace ST.Buz.Base.Entity
{
    /// <summary>
    /// 业务编码
    /// </summary>
    [Serializable]
    [Table("Sys_BuzRowNum")]
    public partial class Sys_BuzRowNum
    {
        /// <summary>
        /// ID
        /// </summary>
        [Key]
        [Column("ID")]
        public int ID { get; set; }

        /// <summary>
        /// 业务类型ID
        /// </summary>
        [Display(Name = "业务类型ID")]
        [Column("BuzType")]
        public int BuzType { get; set; }

        /// <summary>
        /// 业务类型
        /// </summary>
        [Display(Name = "业务类型")]
        [Column("BuzTypeText")]
        [StringLength(100, ErrorMessage = "{0}长度不能超过{1}")]
        public string BuzTypeText { get; set; }

        /// <summary>
        /// 业务代码
        /// </summary>
        [Display(Name = "业务代码")]
        [Column("Code")]
        [StringLength(50, ErrorMessage = "{0}长度不能超过{1}")]
        public string Code { get; set; }

        /// <summary>
        /// 编码名称
        /// </summary>
        [Display(Name = "编码名称")]
        [Column("Name")]
        [StringLength(50, ErrorMessage = "{0}长度不能超过{1}")]
        public string Name { get; set; }

        /// <summary>
        /// 编码规则
        /// </summary>
        [Display(Name = "编码规则")]
        [Column("RuleTpl")]
        [StringLength(50, ErrorMessage = "{0}长度不能超过{1}")]
        public string RuleTpl { get; set; }

        /// <summary>
        /// 编号最小长度
        /// </summary>
        [Display(Name = "编号最小长度")]
        [Column("MinLen")]
        public int MinLen { get; set; }

        /// <summary>
        /// 当前值
        /// </summary>
        [Column("Current")]
        public int Current { get; set; }

        /// <summary>
        /// 步进值
        /// </summary>
        [Column("Step")]
        public int Step { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [Display(Name = "备注")]
        [Column("Comment")]
        [StringLength(50, ErrorMessage = "{0}长度不能超过{1}")]
        public string Comment { get; set; }

        /// <summary>
        /// 是否允许修改
        /// </summary>
        [Column("Freezed")]
        public bool Freezed { get; set; }

        /// <summary>
        /// 是否系统保留（系统保留不能删除）
        /// </summary>
        [Column("Reserved")]
        public bool Reserved { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        [Column("Sort")]
        public int Sort { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [Column("AddDate")]
        public DateTime AddDate { get; set; }

        /// <summary>
        /// 创建人ID
        /// </summary>
        [Column("AddManID")]
        [JsonIgnore]
        public int AddManID { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        [Column("AddManName")]
        [StringLength(20, ErrorMessage = "{0}长度不能超过{1}")]
        public string AddManName { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [Column("OrgID")]
        public int OrgID { get; set; }
    }
}
